package com.zyg.auth.client;

import com.zyg.auth.entity.TbUser;
import com.zyg.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by WF on 2021/12/31 14:30
 */
@FeignClient("zyg-user")
public interface UserClient {

    //1. 根据用户id查询用户对象
    @GetMapping("/user/findByUid/{uid}")
    TbUser findByUid(@PathVariable("uid") String uid );

    //2. 添加用户
    @PostMapping("/user/insert")
    R insert(@RequestBody TbUser user);

    //3. 修改用户
    @PostMapping("/user/update")
    R update(@RequestBody TbUser user);
}
